package org.icress.fusion.moc

class Tg {//班组完成情况-异常工时

	Tc tc	
	Td td	//异常工时代号
	Float tg001	//异常工时
	Float tg002 //K值
	Float tg003 //K值分摊工时
	
	static belongsTo = [tc:Tc]
	
    static constraints = {
        tc(nullable:false)
		td(unique:'tc', nullable:false)
		tg001(min:0f, nullable:false) 
		tg002(min : 0f, scale:6, nullable:false)
    }
	
	static mapping = {
		table 'MOC$TG'
		tg003 formula : 'tg001 * tg002'
        autoTimestamp true
	}
}
